
/**
 * @author Jorge Hernandez
 */
class org.molamil.acto.pages.AbstractMovieContext {
	
	
	// Properties
	
	private var _name:String;
	private var _title:String;
	private var _target:String;
	private var _base:String;
	private var _container:String;
	private var _props:Object;
	private var _type:String;
	private var _className:String;
	private var _isPreload:Boolean;
	private var _depends:Array;
	
	
	// Constructor
	
	public function AbstractMovieContext() {
		props = new Object();
	}
	
	
	// Functions
	
	public function toString():String {
		var s:String = "org.molamil.acto.pages.AbstractMovieContext" +
					   "\n\tname = " + _name +
					   "\n\ttitle = " + _title +
					   "\n\ttarget = " + _target +
					   "\n\tbase = " + _base +
					   "\n\tcontainer = " + _container +
					   "\n\tprops = " + _props +
					   "\n\ttype = " + _type +
					   "\n\tclassName = " + _className +
					   "\n\tisPreload = " + _isPreload +
					   "\n\tdepends = " + _depends;
		return s;
	}
	
	
	// Getter/Setter
	
	/**
	 * Page unique name.
	 */
	public function get name():String {
		return _name;
	}
	
	public function set name(name:String):Void {
		this._name = name;
	}
	
	/**
	 * Page title.
	 */
	public function get title():String {
		return _title;
	}
	
	public function set title(title:String):Void {
		this._title = title;
	}
		
	/**
	 * Target, where to find the page:
	 * <ul>
	 * 	<li>In <cite>External</cite> pages: Path to the file (i.e. <cite>/movies/myMovie.swf</cite>).</li>
	 * 	<li>In <cite>Internal</cite> pages: Path to the MovieClip (i.e. <cite>_root.content.my_mc</cite>).</li>
	 * 	<li>In <cite>Linked</cite> pages: Linkage name of the MovieClip (i.e. <cite>my_mc</cite>).</li>
	 * </ul>
	 */
	public function get target():String {
		return _target;
	}
	
	public function set target(target:String):Void {
		this._target = target;
	}
	
	/**
	 * Target for the base mc that will be wrapper by the <code>AbstractMcWrapper</code>.
	 * I.e. /page_mc/wrapped_mc
	 */
	public function get base():String {
		return _base;
	}
	
	public function set base(base:String):Void {
		this._base = base;
	}
	
	/**
	 * Target for the container mc on your main SWF where the Page will be loaded onto.
	 * I.e. /container_mc
	 */
	public function get container():String {
		return _container;
	}
	
	public function set container(container:String):Void {
		this._container = container;
	}
	
	/**
	 * "Map" containing page properties.
	 */
	public function get props():Object {
		return _props;
	}
	
	public function set props(props:Object):Void {
		this._props = props;
	}
	
	/**
	 * Type of the <code>PageMaster</code> to create:
	 * <ul>
	 * 	<li><code>"external"</code> for <code>MovieClip</code>'s loaded as external SWF's.</li>
	 * 	<li><code>"internal"</code> for <code>MovieClip</code>'s that are already on the stage.</li>
	 * 	<li><code>"linked"</code> for <code>MovieClip</code>'s that are in the library with a linkage name.</li>
	 * </ul>
	 */
	public function get type():String {
		return _type;
	}
	
	public function set type(type:String):Void {
		this._type = type;
	}
	
	/**
	 * Name of the class of the <code>LcMcWrapper</code> that will wrap the <code>MovieClip</code> corresponding
	 * to the <code>PageMaster</code>.
	 */
	public function get className():String {
		return _className;
	}
	
	public function set className(className:String):Void {
		this._className = className;
	}
	
	/**
	 * Whether the page is to be preloaded.
	 */
	public function get isPreload():Boolean {
		return _isPreload;
	}
	
	public function set isPreload(isPreload:Boolean):Void {
		this._isPreload = isPreload;
	}
	
	/**
	 * Movies that will be displayed when this movie is displayed (dependancies).
	 */
	public function get depends():Array {
		return _depends;
	}
	
	public function set depends(depends:Array):Void {
		this._depends = depends;
	}
	
	
}
